//
//  WWTabBarController.m
//  YiQiTingShu
//
//  Created by WeiWei on 15/11/14.
//  Copyright © 2015年 直到世界的尽头. All rights reserved.
//

#import "WWTabBarController.h"

#import "FindViewController.h"
#import "DIYViewController.h"
#import "MyViewController.h"
#import "RelaxViewController.h"
#import "ViewController.h"
#import "Music.h"
#import "LastSongViewController.h"

@interface WWTabBarController ()

@end

@implementation WWTabBarController


- (void)viewDidLoad {
    [super viewDidLoad];
    FindViewController *findVC = [[FindViewController alloc] init];
    UINavigationController *findNav = [[UINavigationController alloc] initWithRootViewController:findVC];
    findNav.navigationBar.translucent = NO;
    findVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"发现" image:[UIImage imageNamed:@"iconfont-fangzi@2x.png"] tag:1000];
    
    //NSLog(@"%@", [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]);
    
    [findNav.navigationBar NightWithType:UIViewColorTypeNormal];
    
    DIYViewController *diyVC = [[DIYViewController alloc] init];
    UINavigationController *diyNav = [[UINavigationController alloc] initWithRootViewController:diyVC];
    diyNav.navigationBar.translucent = NO;
    diyVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"定制听" image:[UIImage imageNamed:@"listen@2x.png"] tag:1001];
    [diyNav.navigationBar NightWithType:UIViewColorTypeNormal];
    
    ViewController *vc = [[ViewController alloc]init];
    UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];
    nav.navigationBar.translucent = NO;
    vc.tabBarItem = [[UITabBarItem alloc]initWithTabBarSystemItem:UITabBarSystemItemMore tag:1002];
    [nav.navigationBar NightWithType:UIViewColorTypeNormal];
    
    RelaxViewController *relaxVC = [[RelaxViewController alloc]init];
    UINavigationController *relaxNav = [[UINavigationController alloc]initWithRootViewController:relaxVC];
    relaxNav.navigationBar.translucent = NO;
    relaxVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"休闲一刻" image:[UIImage imageNamed:@"duanzi@2x.png"] tag:1003];
    [relaxNav.navigationBar NightWithType:UIViewColorTypeNormal];
    
    MyViewController *myVC = [[MyViewController alloc]init];
    UINavigationController *myNav = [[UINavigationController alloc]initWithRootViewController:myVC];
    myNav.navigationBar.translucent = NO;
    myVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"我的" image:[UIImage imageNamed:@"wode@2x.png"] tag:1004];
    [myNav.navigationBar NightWithType:UIViewColorTypeNormal];
    [self.view addSubview:[PlayerButton shareButton]];
    self.tabBar.translucent = NO;
    self.viewControllers = @[findNav, diyNav, nav, relaxNav, myNav];
    [[UITabBar appearance] setTintColor:[UIColor orangeColor]];
    [[UITabBar appearance] setBarTintColor:[ThemeManage shareThemeManage].bgColor];
    
}

@end
